import cv2 as cv

filename = r'/Users/apple/Desktop/cv/cv1/lena.jpg'
img = cv.imread(filename)

# Task2
cv.imshow('Hello, world !', img)

# Task3
hsv = cv.cvtColor(img, cv.COLOR_BGR2HSV)

cv.imshow('Hue', hsv[:, :, 0])
cv.imshow('Saturation', hsv[:, :, 1])
cv.imshow('Value', hsv[:, :, 2])


cv.imshow('Blue', img[:, :, 0])
cv.imshow('Green', img[:, :, 1])
cv.imshow('Red', img[:, :, 2])

cv.waitKey()
cv.destroyAllWindows()
